package com.zhinan.utils;

import com.zhinan.common.SysConstant;
import com.zhinan.entity.SysUser;

/**
 * @Description: 系统用户操作的相关工具类
 * @Author: ZhiNan
 * @Date: 2023-04-10 15:52
 * @Version: 1.0
 */
public class UserUtil extends SessionUtil{

    /**
     * 从session中获取用户信息
     */
    public static SysUser getUserFromSession(){
        return (SysUser) getObjectFromSession(SysConstant.USER_INFO);
    }


    /**
     * 保存用户信息到Session中
     */
    public static void setUserToSession(SysUser sysUser){
        setObjectToSession(SysConstant.USER_INFO,sysUser);
    }


}
